<template>
  <el-card>
      <el-button type="primary" icon="el-icon-circle-plus-outline" @click="changModel">增加</el-button>
      <el-divider></el-divider>
      <SortTable @updateCate = "updateSort" :sortList="sortList"></SortTable>
      <SotrMudel @updateSort = "updateSort" :showFlag="showFlag" :sortList="sortList"></SotrMudel>
  </el-card>    
</template>

<script>
import SortTable from './SortTable'
import SotrMudel from './SotrMudel'
import {mapState,mapActions} from 'vuex'
export default {
  data(){
    return {
      showFlag: {status: false}
    }
  },
  computed:{
    ...mapState({sortList: state=>state.sort.sortList})
  },
  methods:{
    updateSort(){
      this.sortListActions()
    },
    changModel(){
      this.showFlag.status = true
    },
    ...mapActions('sort',['sortListActions'])
  },
  created(){
    this.sortListActions()
  },
  components:{
    SortTable,
    SotrMudel
  }
}
</script>

<style>

</style>